using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;

namespace Evolution.Engine.Managers
{
    public class NameManager : Singleton<NameManager>
    {
        private Dictionary<string, string> _Names = new Dictionary<string, string>();

        //public Hashtable Names { get { return _Names; } }

        public string NextName(string group)
        {
            if (!_Names.ContainsKey(group))
                _Names.Add(group, group + ".0");

            string[] name = _Names[group].Split('.');

            int ctr = Convert.ToInt32(name[1]) + 1;

            _Names[group] = name[0] + "." + ctr.ToString();

            return _Names[group];
        }
    }
}
